<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>aws-crt-cpp: /home/ANT.AMAZON.COM/dengket/doc/aws-crt-cpp/include/aws/crt/mqtt/MqttClient.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">aws-crt-cpp
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_076842b242c291358044feb169933571.html">aws</a></li><li class="navelem"><a class="el" href="dir_cc4322e4b2151c90adb7cd2e3f54423a.html">crt</a></li><li class="navelem"><a class="el" href="dir_59c38d69605e708946f03ec64f0b9d1a.html">mqtt</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">MqttClient.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="crt_2mqtt_2MqttClient_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * You may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * A copy of the License is located at</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *  http://aws.amazon.com/apache2.0</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * express or implied. See the License for the specific language governing</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * permissions and limitations under the License.</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="Exports_8h.html">aws/crt/Exports.h</a>&gt;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="StlAllocator_8h.html">aws/crt/StlAllocator.h</a>&gt;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="Types_8h.html">aws/crt/Types.h</a>&gt;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="HttpConnection_8h.html">aws/crt/http/HttpConnection.h</a>&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="SocketOptions_8h.html">aws/crt/io/SocketOptions.h</a>&gt;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="TlsOptions_8h.html">aws/crt/io/TlsOptions.h</a>&gt;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &lt;aws/mqtt/client.h&gt;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &lt;atomic&gt;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &lt;functional&gt;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceAws.html">Aws</a></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;{</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="keyword">namespace </span>Crt</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    {</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        <span class="keyword">namespace </span>Io</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;        {</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;            <span class="keyword">class </span>ClientBootstrap;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        }</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        <span class="keyword">namespace </span>Http</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        {</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;            <span class="keyword">class </span>HttpRequest;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        }</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="keyword">namespace </span>Mqtt</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        {</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;            <span class="keyword">class </span>MqttClient;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;            <span class="keyword">class </span>MqttConnection;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="namespaceAws_1_1Crt_1_1Mqtt.html#a4f836d0b80ada1251f643bf357b0fc60">   51</a></span>&#160;            <span class="keyword">using</span> <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a4f836d0b80ada1251f643bf357b0fc60">OnConnectionInterruptedHandler</a> = std::function&lt;void(<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a> &amp;connection, <span class="keywordtype">int</span> <a class="code" href="structerror.html">error</a>)&gt;;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160; </div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="namespaceAws_1_1Crt_1_1Mqtt.html#a43028af232c9cf8c5a34da986d9afa06">   56</a></span>&#160;            <span class="keyword">using</span> <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a43028af232c9cf8c5a34da986d9afa06">OnConnectionResumedHandler</a> =</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;                std::function&lt;void(<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a> &amp;connection, <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#ac27f3ee931e088bb234da384b2a13617">ReturnCode</a> connectCode, <span class="keywordtype">bool</span> sessionPresent)&gt;;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="namespaceAws_1_1Crt_1_1Mqtt.html#aef2f7258854ef807340164783747a936">   62</a></span>&#160;            <span class="keyword">using</span> <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#aef2f7258854ef807340164783747a936">OnConnectionCompletedHandler</a> = std::function&lt;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;                void(<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a> &amp;connection, <span class="keywordtype">int</span> errorCode, <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#ac27f3ee931e088bb234da384b2a13617">ReturnCode</a> returnCode, <span class="keywordtype">bool</span> sessionPresent)&gt;;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160; </div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="namespaceAws_1_1Crt_1_1Mqtt.html#aedc46fe650f31ca76c9b045a45258ffc">   68</a></span>&#160;            <span class="keyword">using</span> <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#aedc46fe650f31ca76c9b045a45258ffc">OnSubAckHandler</a> = std::function&lt;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;                void(<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a> &amp;connection, uint16_t packetId, <span class="keyword">const</span> <a class="code" href="namespaceAws_1_1Crt.html#a865381ab2bc5db45524fa6ce43c394c3">String</a> &amp;topic, <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a73e44d9ab196e11a9732981690ac5423">QOS</a> qos, <span class="keywordtype">int</span> errorCode)&gt;;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="namespaceAws_1_1Crt_1_1Mqtt.html#a114f4b34cc46025478d479beaacc53ff">   74</a></span>&#160;            <span class="keyword">using</span> <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a114f4b34cc46025478d479beaacc53ff">OnMultiSubAckHandler</a> = std::function&lt;void(</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a> &amp;connection,</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;                uint16_t packetId,</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;                <span class="keyword">const</span> <a class="code" href="namespaceAws_1_1Crt.html#ac975615d2a9140660077ef7b264d9b6c">Vector&lt;String&gt;</a> &amp;topics,</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a73e44d9ab196e11a9732981690ac5423">QOS</a> qos,</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;                <span class="keywordtype">int</span> errorCode)&gt;;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160; </div>
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="namespaceAws_1_1Crt_1_1Mqtt.html#aa0e931986cc3e616c6adf935d760ecb0">   84</a></span>&#160;            <span class="keyword">using</span> <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#aa0e931986cc3e616c6adf935d760ecb0">OnDisconnectHandler</a> = std::function&lt;void(<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a> &amp;connection)&gt;;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="namespaceAws_1_1Crt_1_1Mqtt.html#a4c45cd45103957d38303f03f37d251e2">   89</a></span>&#160;            <span class="keyword">using</span> <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a4c45cd45103957d38303f03f37d251e2">OnPublishReceivedHandler</a> =</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;                std::function&lt;void(<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a> &amp;connection, <span class="keyword">const</span> <a class="code" href="namespaceAws_1_1Crt.html#a865381ab2bc5db45524fa6ce43c394c3">String</a> &amp;topic, <span class="keyword">const</span> <a class="code" href="namespaceAws_1_1Crt.html#aa760a7d9714d6c28091c2b1cf7029876">ByteBuf</a> &amp;payload)&gt;;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="namespaceAws_1_1Crt_1_1Mqtt.html#a44fc5120bbbe950dc76488128259b18f">   92</a></span>&#160;            <span class="keyword">using</span> <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a44fc5120bbbe950dc76488128259b18f">OnOperationCompleteHandler</a> =</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;                std::function&lt;void(<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a> &amp;connection, uint16_t packetId, <span class="keywordtype">int</span> errorCode)&gt;;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="namespaceAws_1_1Crt_1_1Mqtt.html#a5d9638829a60d2c9961d7b789cebcb42">   99</a></span>&#160;            <span class="keyword">using</span> <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a5d9638829a60d2c9961d7b789cebcb42">OnWebSocketHandshakeInterceptComplete</a> =</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;                std::function&lt;void(<span class="keyword">const</span> std::shared_ptr&lt;Http::HttpRequest&gt; &amp;, <span class="keywordtype">int</span> errorCode)&gt;;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="namespaceAws_1_1Crt_1_1Mqtt.html#a164f0b4ae6ab32eae4125e685349a8d1">  108</a></span>&#160;            <span class="keyword">using</span> <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a164f0b4ae6ab32eae4125e685349a8d1">OnWebSocketHandshakeIntercept</a> = std::function&lt;</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;                void(std::shared_ptr&lt;Http::HttpRequest&gt; req, <span class="keyword">const</span> <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a5d9638829a60d2c9961d7b789cebcb42">OnWebSocketHandshakeInterceptComplete</a> &amp;onComplete)&gt;;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">  117</a></span>&#160;            <span class="keyword">class </span><a class="code" href="Exports_8h.html#a0a3f6c46aee6b588ce99a142cdb22d1d">AWS_CRT_CPP_API</a> <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a> final</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;            {</div>
<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#a85a96c1d928c2dbdd7e09a1def5d4a8e">  119</a></span>&#160;                <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html">MqttClient</a>;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160; </div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;              <span class="keyword">public</span>:</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;                ~<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a>();</div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#acc5a84e656aac1bb03da10b7adc1fc8f">  123</a></span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#acc5a84e656aac1bb03da10b7adc1fc8f">MqttConnection</a>(<span class="keyword">const</span> <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a> &amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#a83ad97e9bcf1e8aa58063b30873fa06e">  124</a></span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#a83ad97e9bcf1e8aa58063b30873fa06e">MqttConnection</a>(<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a> &amp;&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#a464feef8ce602bead6f0b6f24ca124fb">  125</a></span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a> &amp;<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#a464feef8ce602bead6f0b6f24ca124fb">operator=</a>(<span class="keyword">const</span> <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a> &amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#a55dbd5197293bc5e72cea9140d8ebd34">  126</a></span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a> &amp;<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#a55dbd5197293bc5e72cea9140d8ebd34">operator=</a>(<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a> &amp;&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;                <span class="keyword">operator</span> bool() const noexcept;</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;                <span class="keywordtype">int</span> <a class="code" href="namespaceAws_1_1Crt.html#aec41cfe367315d4e4e1712f19e3d3061">LastError</a>() const noexcept;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160; </div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;                <span class="keywordtype">bool</span> SetWill(const <span class="keywordtype">char</span> *topic, <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a73e44d9ab196e11a9732981690ac5423">QOS</a> qos, <span class="keywordtype">bool</span> retain, const <a class="code" href="namespaceAws_1_1Crt.html#aa760a7d9714d6c28091c2b1cf7029876">ByteBuf</a> &amp;payload) noexcept;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160; </div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;                <span class="keywordtype">bool</span> SetLogin(const <span class="keywordtype">char</span> *userName, const <span class="keywordtype">char</span> *password) noexcept;</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160; </div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;                <span class="keywordtype">bool</span> SetWebsocketProxyOptions(const Http::HttpClientConnectionProxyOptions &amp;proxyOptions) noexcept;</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160; </div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;                <span class="keywordtype">bool</span> Connect(</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;                    const <span class="keywordtype">char</span> *clientId,</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;                    <span class="keywordtype">bool</span> cleanSession,</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;                    uint16_t keepAliveTimeSecs = 0,</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;                    uint32_t pingTimeoutMs = 0) noexcept;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160; </div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;                <span class="keywordtype">bool</span> Disconnect() noexcept;</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160; </div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;                uint16_t Subscribe(</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;                    const <span class="keywordtype">char</span> *topicFilter,</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;                    <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a73e44d9ab196e11a9732981690ac5423">QOS</a> qos,</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;                    <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a4c45cd45103957d38303f03f37d251e2">OnPublishReceivedHandler</a> &amp;&amp;onPublish,</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;                    <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#aedc46fe650f31ca76c9b045a45258ffc">OnSubAckHandler</a> &amp;&amp;onSubAck) noexcept;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;                uint16_t Subscribe(</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;                    const <a class="code" href="namespaceAws_1_1Crt.html#ac975615d2a9140660077ef7b264d9b6c">Vector</a>&lt;std::pair&lt;const <span class="keywordtype">char</span> *, <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a4c45cd45103957d38303f03f37d251e2">OnPublishReceivedHandler</a>&gt;&gt; &amp;topicFilters,</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;                    <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a73e44d9ab196e11a9732981690ac5423">QOS</a> qos,</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;                    <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a114f4b34cc46025478d479beaacc53ff">OnMultiSubAckHandler</a> &amp;&amp;onOpComplete) noexcept;</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160; </div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;                <span class="keywordtype">bool</span> SetOnMessageHandler(<a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a4c45cd45103957d38303f03f37d251e2">OnPublishReceivedHandler</a> &amp;&amp;onPublish) noexcept;</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160; </div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;                uint16_t Unsubscribe(const <span class="keywordtype">char</span> *topicFilter, <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a44fc5120bbbe950dc76488128259b18f">OnOperationCompleteHandler</a> &amp;&amp;onOpComplete) noexcept;</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160; </div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;                uint16_t Publish(</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;                    const <span class="keywordtype">char</span> *topic,</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;                    <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a73e44d9ab196e11a9732981690ac5423">QOS</a> qos,</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;                    <span class="keywordtype">bool</span> retain,</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;                    const <a class="code" href="namespaceAws_1_1Crt.html#aa760a7d9714d6c28091c2b1cf7029876">ByteBuf</a> &amp;payload,</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;                    <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a44fc5120bbbe950dc76488128259b18f">OnOperationCompleteHandler</a> &amp;&amp;onOpComplete) noexcept;</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160; </div>
<div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#a1e77801f332c1a9740f80f50614806e2">  211</a></span>&#160;                <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a4f836d0b80ada1251f643bf357b0fc60">OnConnectionInterruptedHandler</a> OnConnectionInterrupted;</div>
<div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#ac7795ed1c4b50b8ddf1ac58d11e7bf43">  212</a></span>&#160;                <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a43028af232c9cf8c5a34da986d9afa06">OnConnectionResumedHandler</a> OnConnectionResumed;</div>
<div class="line"><a name="l00213"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#af3c4eef93ed2eba8ef22ff16066d0e2c">  213</a></span>&#160;                <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#aef2f7258854ef807340164783747a936">OnConnectionCompletedHandler</a> OnConnectionCompleted;</div>
<div class="line"><a name="l00214"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#a74d58fa4e04f534892199fd28892e657">  214</a></span>&#160;                <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#aa0e931986cc3e616c6adf935d760ecb0">OnDisconnectHandler</a> OnDisconnect;</div>
<div class="line"><a name="l00215"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#a18056c9c08905a5eaeba8555702eda75">  215</a></span>&#160;                <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#a164f0b4ae6ab32eae4125e685349a8d1">OnWebSocketHandshakeIntercept</a> WebsocketInterceptor;</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160; </div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;              private:</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;                aws_mqtt_client *m_owningClient;</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;                aws_mqtt_client_connection *m_underlyingConnection;</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;                <a class="code" href="namespaceAws_1_1Crt.html#a865381ab2bc5db45524fa6ce43c394c3">String</a> m_hostName;</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;                uint16_t m_port;</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;                Crt::Io::TlsContext m_tlsContext;</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;                Io::TlsConnectionOptions m_tlsOptions;</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;                Io::SocketOptions m_socketOptions;</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;                Crt::<a class="code" href="classAws_1_1Crt_1_1Optional.html">Optional</a>&lt;Http::HttpClientConnectionProxyOptions&gt; m_proxyOptions;</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;                <span class="keywordtype">void</span> *m_onAnyCbData;</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;                <span class="keywordtype">bool</span> m_useTls;</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;                <span class="keywordtype">bool</span> m_useWebsocket;</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160; </div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a>(</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                    aws_mqtt_client *client,</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;                    const <span class="keywordtype">char</span> *hostName,</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;                    uint16_t port,</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;                    const Io::SocketOptions &amp;socketOptions,</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;                    const Crt::Io::TlsContext &amp;tlsContext,</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;                    <span class="keywordtype">bool</span> useWebsocket) noexcept;</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160; </div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a>(</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;                    aws_mqtt_client *client,</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;                    const <span class="keywordtype">char</span> *hostName,</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;                    uint16_t port,</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;                    const Io::SocketOptions &amp;socketOptions,</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;                    <span class="keywordtype">bool</span> useWebsocket) noexcept;</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160; </div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;                static <span class="keywordtype">void</span> s_onConnectionInterrupted(aws_mqtt_client_connection *, <span class="keywordtype">int</span> errorCode, <span class="keywordtype">void</span> *userData);</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;                static <span class="keywordtype">void</span> s_onConnectionCompleted(</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;                    aws_mqtt_client_connection *,</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;                    <span class="keywordtype">int</span> errorCode,</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;                    enum aws_mqtt_connect_return_code returnCode,</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;                    <span class="keywordtype">bool</span> sessionPresent,</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;                    <span class="keywordtype">void</span> *userData);</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;                static <span class="keywordtype">void</span> s_onConnectionResumed(</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;                    aws_mqtt_client_connection *,</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;                    <a class="code" href="namespaceAws_1_1Crt_1_1Mqtt.html#ac27f3ee931e088bb234da384b2a13617">ReturnCode</a> returnCode,</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;                    <span class="keywordtype">bool</span> sessionPresent,</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;                    <span class="keywordtype">void</span> *userData);</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160; </div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;                static <span class="keywordtype">void</span> s_onDisconnect(aws_mqtt_client_connection *connection, <span class="keywordtype">void</span> *userData);</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;                static <span class="keywordtype">void</span> s_onPublish(</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;                    aws_mqtt_client_connection *connection,</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;                    const aws_byte_cursor *topic,</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;                    const aws_byte_cursor *payload,</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;                    <span class="keywordtype">void</span> *user_data);</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160; </div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;                static <span class="keywordtype">void</span> s_onSubAck(</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;                    aws_mqtt_client_connection *connection,</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;                    uint16_t packetId,</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;                    const struct aws_byte_cursor *topic,</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;                    enum aws_mqtt_qos qos,</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;                    <span class="keywordtype">int</span> error_code,</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;                    <span class="keywordtype">void</span> *userdata);</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;                static <span class="keywordtype">void</span> s_onMultiSubAck(</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;                    aws_mqtt_client_connection *connection,</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;                    uint16_t packetId,</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;                    const struct aws_array_list *topic_subacks,</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;                    <span class="keywordtype">int</span> error_code,</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;                    <span class="keywordtype">void</span> *userdata);</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;                static <span class="keywordtype">void</span> s_onOpComplete(</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;                    aws_mqtt_client_connection *connection,</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;                    uint16_t packetId,</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;                    <span class="keywordtype">int</span> errorCode,</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;                    <span class="keywordtype">void</span> *userdata);</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160; </div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;                static <span class="keywordtype">void</span> s_onWebsocketHandshake(</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;                    struct aws_http_message *request,</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;                    <span class="keywordtype">void</span> *user_data,</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;                    aws_mqtt_transform_websocket_handshake_complete_fn *complete_fn,</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;                    <span class="keywordtype">void</span> *complete_ctx);</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160; </div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;                static <span class="keywordtype">void</span> s_connectionInit(</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;                    <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a> *self,</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;                    const <span class="keywordtype">char</span> *hostName,</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;                    uint16_t port,</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;                    const Io::SocketOptions &amp;socketOptions);</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;            };</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160; </div>
<div class="line"><a name="l00302"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html">  302</a></span>&#160;            class <a class="code" href="Exports_8h.html#a0a3f6c46aee6b588ce99a142cdb22d1d">AWS_CRT_CPP_API</a> <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html">MqttClient</a> final</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;            {</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;              <span class="keyword">public</span>:</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html">MqttClient</a>(<a class="code" href="classAws_1_1Crt_1_1Io_1_1ClientBootstrap.html">Io::ClientBootstrap</a> &amp;bootstrap, <a class="code" href="namespaceAws_1_1Crt.html#a3c9efb213e2de565038afcfd4f8afcda">Allocator</a> *allocator = <a class="code" href="namespaceAws_1_1Crt.html#a7178ef65f261a8db52a624458331bbb2">g_allocator</a>) noexcept;</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160; </div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;                ~<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html">MqttClient</a>();</div>
<div class="line"><a name="l00311"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html#a358711e0f55a862143bdb4d69081fdfb">  311</a></span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html#a358711e0f55a862143bdb4d69081fdfb">MqttClient</a>(<span class="keyword">const</span> <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html">MqttClient</a> &amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html">MqttClient</a>(<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html">MqttClient</a> &amp;&amp;) noexcept;</div>
<div class="line"><a name="l00313"></a><span class="lineno"><a class="line" href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html#a1d8145cf6a3ab1d83643840fb1bfdffc">  313</a></span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html">MqttClient</a> &amp;operator=(const <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html">MqttClient</a> &amp;) = delete;</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;                <a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html">MqttClient</a> &amp;operator=(<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html">MqttClient</a> &amp;&amp;) noexcept;</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;                operator <span class="keywordtype">bool</span>() const noexcept;</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;                <span class="keywordtype">int</span> <a class="code" href="namespaceAws_1_1Crt.html#aec41cfe367315d4e4e1712f19e3d3061">LastError</a>() const noexcept;</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160; </div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;                std::shared_ptr&lt;<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a>&gt; NewConnection(</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;                    const <span class="keywordtype">char</span> *hostName,</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;                    uint16_t port,</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;                    const Io::SocketOptions &amp;socketOptions,</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;                    const Crt::Io::TlsContext &amp;tlsContext,</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;                    <span class="keywordtype">bool</span> useWebsocket = false) noexcept;</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;                std::shared_ptr&lt;<a class="code" href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">MqttConnection</a>&gt; NewConnection(</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;                    const <span class="keywordtype">char</span> *hostName,</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;                    uint16_t port,</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;                    const Io::SocketOptions &amp;socketOptions,</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;                    <span class="keywordtype">bool</span> useWebsocket = false) noexcept;</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160; </div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;              private:</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;                aws_mqtt_client *m_client;</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;            };</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;        } <span class="comment">// namespace Mqtt</span></div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;    }     <span class="comment">// namespace Crt</span></div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;} <span class="comment">// namespace Aws</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="anamespaceAws_1_1Crt_html_a3c9efb213e2de565038afcfd4f8afcda"><div class="ttname"><a href="namespaceAws_1_1Crt.html#a3c9efb213e2de565038afcfd4f8afcda">Aws::Crt::Allocator</a></div><div class="ttdeci">aws_allocator Allocator</div><div class="ttdef"><b>Definition:</b> StlAllocator.h:25</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_html_ac975615d2a9140660077ef7b264d9b6c"><div class="ttname"><a href="namespaceAws_1_1Crt.html#ac975615d2a9140660077ef7b264d9b6c">Aws::Crt::Vector</a></div><div class="ttdeci">std::vector&lt; T, StlAllocator&lt; T &gt; &gt; Vector</div><div class="ttdef"><b>Definition:</b> Types.h:66</div></div>
<div class="ttc" id="aclassAws_1_1Crt_1_1Mqtt_1_1MqttConnection_html_a55dbd5197293bc5e72cea9140d8ebd34"><div class="ttname"><a href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#a55dbd5197293bc5e72cea9140d8ebd34">Aws::Crt::Mqtt::MqttConnection::operator=</a></div><div class="ttdeci">MqttConnection &amp; operator=(MqttConnection &amp;&amp;)=delete</div></div>
<div class="ttc" id="aTypes_8h_html"><div class="ttname"><a href="Types_8h.html">Types.h</a></div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Mqtt_html_a44fc5120bbbe950dc76488128259b18f"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Mqtt.html#a44fc5120bbbe950dc76488128259b18f">Aws::Crt::Mqtt::OnOperationCompleteHandler</a></div><div class="ttdeci">std::function&lt; void(MqttConnection &amp;connection, uint16_t packetId, int errorCode)&gt; OnOperationCompleteHandler</div><div class="ttdef"><b>Definition:</b> MqttClient.h:93</div></div>
<div class="ttc" id="aExports_8h_html_a0a3f6c46aee6b588ce99a142cdb22d1d"><div class="ttname"><a href="Exports_8h.html#a0a3f6c46aee6b588ce99a142cdb22d1d">AWS_CRT_CPP_API</a></div><div class="ttdeci">#define AWS_CRT_CPP_API</div><div class="ttdef"><b>Definition:</b> Exports.h:34</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Mqtt_html_a4c45cd45103957d38303f03f37d251e2"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Mqtt.html#a4c45cd45103957d38303f03f37d251e2">Aws::Crt::Mqtt::OnPublishReceivedHandler</a></div><div class="ttdeci">std::function&lt; void(MqttConnection &amp;connection, const String &amp;topic, const ByteBuf &amp;payload)&gt; OnPublishReceivedHandler</div><div class="ttdef"><b>Definition:</b> MqttClient.h:90</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Mqtt_html_a114f4b34cc46025478d479beaacc53ff"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Mqtt.html#a114f4b34cc46025478d479beaacc53ff">Aws::Crt::Mqtt::OnMultiSubAckHandler</a></div><div class="ttdeci">std::function&lt; void(MqttConnection &amp;connection, uint16_t packetId, const Vector&lt; String &gt; &amp;topics, QOS qos, int errorCode)&gt; OnMultiSubAckHandler</div><div class="ttdef"><b>Definition:</b> MqttClient.h:79</div></div>
<div class="ttc" id="aTlsOptions_8h_html"><div class="ttname"><a href="TlsOptions_8h.html">TlsOptions.h</a></div></div>
<div class="ttc" id="astructerror_html"><div class="ttname"><a href="structerror.html">error</a></div><div class="ttdef"><b>Definition:</b> cJSON.cpp:84</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_html_a7178ef65f261a8db52a624458331bbb2"><div class="ttname"><a href="namespaceAws_1_1Crt.html#a7178ef65f261a8db52a624458331bbb2">Aws::Crt::g_allocator</a></div><div class="ttdeci">Allocator * g_allocator</div><div class="ttdef"><b>Definition:</b> Api.cpp:28</div></div>
<div class="ttc" id="aclassAws_1_1Crt_1_1Mqtt_1_1MqttConnection_html_a83ad97e9bcf1e8aa58063b30873fa06e"><div class="ttname"><a href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#a83ad97e9bcf1e8aa58063b30873fa06e">Aws::Crt::Mqtt::MqttConnection::MqttConnection</a></div><div class="ttdeci">MqttConnection(MqttConnection &amp;&amp;)=delete</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_html_aec41cfe367315d4e4e1712f19e3d3061"><div class="ttname"><a href="namespaceAws_1_1Crt.html#aec41cfe367315d4e4e1712f19e3d3061">Aws::Crt::LastError</a></div><div class="ttdeci">AWS_CRT_CPP_API int LastError() noexcept</div><div class="ttdef"><b>Definition:</b> Api.cpp:116</div></div>
<div class="ttc" id="aSocketOptions_8h_html"><div class="ttname"><a href="SocketOptions_8h.html">SocketOptions.h</a></div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_html_aa760a7d9714d6c28091c2b1cf7029876"><div class="ttname"><a href="namespaceAws_1_1Crt.html#aa760a7d9714d6c28091c2b1cf7029876">Aws::Crt::ByteBuf</a></div><div class="ttdeci">aws_byte_buf ByteBuf</div><div class="ttdef"><b>Definition:</b> Types.h:43</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Mqtt_html_ac27f3ee931e088bb234da384b2a13617"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Mqtt.html#ac27f3ee931e088bb234da384b2a13617">Aws::Crt::Mqtt::ReturnCode</a></div><div class="ttdeci">aws_mqtt_connect_return_code ReturnCode</div><div class="ttdef"><b>Definition:</b> Types.h:54</div></div>
<div class="ttc" id="aclassAws_1_1Crt_1_1Mqtt_1_1MqttClient_html_a358711e0f55a862143bdb4d69081fdfb"><div class="ttname"><a href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html#a358711e0f55a862143bdb4d69081fdfb">Aws::Crt::Mqtt::MqttClient::MqttClient</a></div><div class="ttdeci">MqttClient(const MqttClient &amp;)=delete</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Mqtt_html_a164f0b4ae6ab32eae4125e685349a8d1"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Mqtt.html#a164f0b4ae6ab32eae4125e685349a8d1">Aws::Crt::Mqtt::OnWebSocketHandshakeIntercept</a></div><div class="ttdeci">std::function&lt; void(std::shared_ptr&lt; Http::HttpRequest &gt; req, const OnWebSocketHandshakeInterceptComplete &amp;onComplete)&gt; OnWebSocketHandshakeIntercept</div><div class="ttdef"><b>Definition:</b> MqttClient.h:109</div></div>
<div class="ttc" id="aHttpConnection_8h_html"><div class="ttname"><a href="HttpConnection_8h.html">HttpConnection.h</a></div></div>
<div class="ttc" id="aclassAws_1_1Crt_1_1Mqtt_1_1MqttConnection_html_acc5a84e656aac1bb03da10b7adc1fc8f"><div class="ttname"><a href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#acc5a84e656aac1bb03da10b7adc1fc8f">Aws::Crt::Mqtt::MqttConnection::MqttConnection</a></div><div class="ttdeci">MqttConnection(const MqttConnection &amp;)=delete</div></div>
<div class="ttc" id="anamespaceAws_html"><div class="ttname"><a href="namespaceAws.html">Aws</a></div><div class="ttdef"><b>Definition:</b> Api.h:25</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Mqtt_html_aedc46fe650f31ca76c9b045a45258ffc"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Mqtt.html#aedc46fe650f31ca76c9b045a45258ffc">Aws::Crt::Mqtt::OnSubAckHandler</a></div><div class="ttdeci">std::function&lt; void(MqttConnection &amp;connection, uint16_t packetId, const String &amp;topic, QOS qos, int errorCode)&gt; OnSubAckHandler</div><div class="ttdef"><b>Definition:</b> MqttClient.h:69</div></div>
<div class="ttc" id="aExports_8h_html"><div class="ttname"><a href="Exports_8h.html">Exports.h</a></div></div>
<div class="ttc" id="aclassAws_1_1Crt_1_1Optional_html"><div class="ttname"><a href="classAws_1_1Crt_1_1Optional.html">Aws::Crt::Optional</a></div><div class="ttdef"><b>Definition:</b> Optional.h:32</div></div>
<div class="ttc" id="aStlAllocator_8h_html"><div class="ttname"><a href="StlAllocator_8h.html">StlAllocator.h</a></div></div>
<div class="ttc" id="aclassAws_1_1Crt_1_1Mqtt_1_1MqttConnection_html"><div class="ttname"><a href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html">Aws::Crt::Mqtt::MqttConnection</a></div><div class="ttdef"><b>Definition:</b> MqttClient.h:118</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_html_a865381ab2bc5db45524fa6ce43c394c3"><div class="ttname"><a href="namespaceAws_1_1Crt.html#a865381ab2bc5db45524fa6ce43c394c3">Aws::Crt::String</a></div><div class="ttdeci">std::basic_string&lt; char, std::char_traits&lt; char &gt;, StlAllocator&lt; char &gt; &gt; String</div><div class="ttdef"><b>Definition:</b> Types.h:58</div></div>
<div class="ttc" id="aclassAws_1_1Crt_1_1Io_1_1ClientBootstrap_html"><div class="ttname"><a href="classAws_1_1Crt_1_1Io_1_1ClientBootstrap.html">Aws::Crt::Io::ClientBootstrap</a></div><div class="ttdef"><b>Definition:</b> Bootstrap.h:45</div></div>
<div class="ttc" id="aclassAws_1_1Crt_1_1Mqtt_1_1MqttClient_html"><div class="ttname"><a href="classAws_1_1Crt_1_1Mqtt_1_1MqttClient.html">Aws::Crt::Mqtt::MqttClient</a></div><div class="ttdef"><b>Definition:</b> MqttClient.h:303</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Mqtt_html_a43028af232c9cf8c5a34da986d9afa06"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Mqtt.html#a43028af232c9cf8c5a34da986d9afa06">Aws::Crt::Mqtt::OnConnectionResumedHandler</a></div><div class="ttdeci">std::function&lt; void(MqttConnection &amp;connection, ReturnCode connectCode, bool sessionPresent)&gt; OnConnectionResumedHandler</div><div class="ttdef"><b>Definition:</b> MqttClient.h:57</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Mqtt_html_a5d9638829a60d2c9961d7b789cebcb42"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Mqtt.html#a5d9638829a60d2c9961d7b789cebcb42">Aws::Crt::Mqtt::OnWebSocketHandshakeInterceptComplete</a></div><div class="ttdeci">std::function&lt; void(const std::shared_ptr&lt; Http::HttpRequest &gt; &amp;, int errorCode)&gt; OnWebSocketHandshakeInterceptComplete</div><div class="ttdef"><b>Definition:</b> MqttClient.h:100</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Mqtt_html_aa0e931986cc3e616c6adf935d760ecb0"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Mqtt.html#aa0e931986cc3e616c6adf935d760ecb0">Aws::Crt::Mqtt::OnDisconnectHandler</a></div><div class="ttdeci">std::function&lt; void(MqttConnection &amp;connection)&gt; OnDisconnectHandler</div><div class="ttdef"><b>Definition:</b> MqttClient.h:84</div></div>
<div class="ttc" id="aclassAws_1_1Crt_1_1Mqtt_1_1MqttConnection_html_a464feef8ce602bead6f0b6f24ca124fb"><div class="ttname"><a href="classAws_1_1Crt_1_1Mqtt_1_1MqttConnection.html#a464feef8ce602bead6f0b6f24ca124fb">Aws::Crt::Mqtt::MqttConnection::operator=</a></div><div class="ttdeci">MqttConnection &amp; operator=(const MqttConnection &amp;)=delete</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Mqtt_html_a73e44d9ab196e11a9732981690ac5423"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Mqtt.html#a73e44d9ab196e11a9732981690ac5423">Aws::Crt::Mqtt::QOS</a></div><div class="ttdeci">aws_mqtt_qos QOS</div><div class="ttdef"><b>Definition:</b> Types.h:53</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Mqtt_html_aef2f7258854ef807340164783747a936"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Mqtt.html#aef2f7258854ef807340164783747a936">Aws::Crt::Mqtt::OnConnectionCompletedHandler</a></div><div class="ttdeci">std::function&lt; void(MqttConnection &amp;connection, int errorCode, ReturnCode returnCode, bool sessionPresent)&gt; OnConnectionCompletedHandler</div><div class="ttdef"><b>Definition:</b> MqttClient.h:63</div></div>
<div class="ttc" id="anamespaceAws_1_1Crt_1_1Mqtt_html_a4f836d0b80ada1251f643bf357b0fc60"><div class="ttname"><a href="namespaceAws_1_1Crt_1_1Mqtt.html#a4f836d0b80ada1251f643bf357b0fc60">Aws::Crt::Mqtt::OnConnectionInterruptedHandler</a></div><div class="ttdeci">std::function&lt; void(MqttConnection &amp;connection, int error)&gt; OnConnectionInterruptedHandler</div><div class="ttdef"><b>Definition:</b> MqttClient.h:51</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
